<?php

namespace app\adminapi\controller;

use think\Db;
use Wechat;
use think\session;
use think\Loader;

class Finance extends Base
{

    //给ajax查询支付结果 by 玉林
    public function check_for_ajax() {
        $car_use_recharge_return = Db::name('car_use_recharge')->where('car_use_recharge_id',session('car_use_recharge_id'))->select();
        if($car_use_recharge_return){
            if (!empty($car_use_recharge_return)) {
                foreach ($car_use_recharge_return as $key => $val) {
                    if($car_use_recharge_return[$key]['state'] == '3'){
                        $data = json(array(
                            'state' => 'success'
                        ));
                        return $data;
                    }
                }
            }
        }
    }
}
